create table  if not exists tbl_order (
    orderSeqID integer primary key, 
    seatID text,
    clientID text,
    instID text,
    marketID text,
    localOrderNo text,
    buyOrSell integer,
    quantity integer,
    traderID text,
    offsetFlag integer,
    matchType integer,
    price real,
    orderType integer,
    orderNo text,
    applyDate text,
    applyTime text,
    orderStatus integer,
    remainQuantity integer,
    cancelTime text,
    cancelID text
);
create index if not exists index_seatID on tbl_order (seatID);
create index if not exists index_clientID on tbl_order (clientID);
create index if not exists index_instID on tbl_order (instID);
create index if not exists index_localOrderNo on tbl_order (localOrderNo);
create index if not exists index_buyOrSell on tbl_order (buyOrSell);
create index if not exists index_quantity on tbl_order (quantity);
create index if not exists index_traderID on tbl_order (traderID);
create index if not exists index_offsetFlag on tbl_order (offsetFlag);
create index if not exists index_matchType on tbl_order (matchType);
create index if not exists index_price on tbl_order (price);
create index if not exists index_orderType on tbl_order (orderType);
create index if not exists index_orderNo on tbl_order (orderNo);
create index if not exists index_applyDate on tbl_order (applyDate);
create index if not exists index_applyTime on tbl_order (applyTime);
create index if not exists index_orderStatus on tbl_order (orderStatus);
create index if not exists index_remainQuantity on tbl_order (remainQuantity);
create index if not exists index_cancelTime on tbl_order (cancelTime);
create index if not exists index_cancelID on tbl_order (cancelID);


begin;
insert into tbl_order values(NULL, 'seatID', 'clientID', 'instID', 'marketID', 'localOrderNo', 1, 2, 'traderID',  3, 4, 256.40, 5, 'orderNo', 'applyDate' , 'applyTime', 6, 7, 'cancelTime', 'cancelID');
commit;
